package org.zxl.module.application;

import com.alibaba.fastjson.JSON;
import org.zxl.module.domain.cloudplatform.PlatformGateway;
import org.zxl.module.domain.persistence.PlatformPersistenceGateway;
import org.zxl.module.infracloud.VmPlatformGateway;
import org.zxl.module.infradb.PlatformPersistenceGatewayImpl;

public class Main {
    public static void main(String[] args) {
        System.out.println("Hello world!");

        PlatformGateway platformGateway = new VmPlatformGateway();
        platformGateway.login();

        PlatformPersistenceGateway platformPersistenceGateway = new PlatformPersistenceGatewayImpl();
        platformPersistenceGateway.save();

        CloudVm cloudVm = new CloudVm("vm1", "192.168.1.1", "running", "vm", "region1");

        System.out.println(JSON.toJSONString(cloudVm));
    }
}